/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Client.domain;

import java.awt.image.BufferedImage;

/**
 *
 * @author Ripper
 */
public class ClientItem 
{
    private String itemName;
    private BufferedImage image;
    
    private String itemType;
    private String itemDescription;
    
    public ClientItem(ClientDomainController cdc, String name, String type, String description, int id)
    {
        itemName = name;
        itemType = type;
        itemDescription = description;
        
        image = cdc.getImage(id);
    }
    public ClientItem(ClientDomainController cdc, String dataString)
    {
        String[] bits = dataString.split("=");
        
        //String name, String type, String description, int id
        String name = bits[0];
        String type = bits[1];
        String description = bits[2];
        String idString = bits[3];
        int id = Integer.parseInt(idString);
        
        itemName = name;
        itemType = type;
        itemDescription = description;
        
        image = cdc.getImage(id);
    }

    public BufferedImage getImage() {
        return image;
    }

    public void setImage(BufferedImage image) {
        this.image = image;
    }

    public String getItemDescription() {
        return itemDescription;
    }

    public void setItemDescription(String itemDescription) {
        this.itemDescription = itemDescription;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public String getItemType() {
        return itemType;
    }

    public void setItemType(String itemType) {
        this.itemType = itemType;
    }
    
    
}
